<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Per-domain or per-user transport (relay)</title>
        <link rel="stylesheet" type="text/css" href="./css/markdown.css" />
    </head>
    <body>

    <div id="navigation">
    <a href="https://www.iredmail.org" target="_blank">
        <img alt="iRedMail web site"
             src="./images/logo-iredmail.png"
             style="vertical-align: middle; height: 30px;"
             />&nbsp;
        <span>iRedMail</span>
    </a>
    &nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="per-domain-or-per-user-transport-relay">Per-domain or per-user transport (relay)</h1>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>Check out the lightweight on-premises email archiving software developed by iRedMail team: <a href="https://spiderd.io/">Spider Email Archiver</a>.</p>
</div>
<div class="toc">
<ul>
<li><a href="#per-domain-or-per-user-transport-relay">Per-domain or per-user transport (relay)</a><ul>
<li><a href="#manage-relay-manually">Manage relay manually</a></li>
<li><a href="#manage-relay-with-iredadmin-pro">Manage relay with iRedAdmin-Pro</a></li>
</ul>
</li>
</ul>
</div>
<h2 id="manage-relay-manually">Manage relay manually</h2>
<p>With OpenLDAP backend, per-domain transport is set in domain account with
attribute <code>mtaTransport</code>, per-user transport is set in user account with
the same attribute. For example:</p>
<pre><code>mtaTransport: dovecot
</code></pre>
<p>With SQL backends, per-domain transport is set in SQL table <code>vmail.domain</code>,
column <code>transport</code>. For example:</p>
<pre><code>sql&gt; USE vmail;

-- Check current transport settings
sql&gt; SELECT domain,transport from domain LIMIT 10;

-- Update transport setting for domain 'my_domain.com'
sql&gt; UPDATE domain SET transport='[new_transport_here]' WHERE domain='my_domain.com';
</code></pre>
<p>Per-user transport is set in table <code>vmail.mailbox</code>, column <code>transport</code>.</p>
<p>Per-user transport has higher priority. If no per-user transport is set
for your mail user, per-domain transport will be used.</p>
<h2 id="manage-relay-with-iredadmin-pro">Manage relay with iRedAdmin-Pro</h2>
<p>With iRedAdmin-Pro, you can easily manage per-domain or per-user transport in
account profile page. Screenshots attached.</p>
<ul>
<li>Per-domain transport/relay:</li>
</ul>
<p><img alt="" src="./images/iredadmin/domain_profile_relay.png" /></p>
<ul>
<li>Per-user transport/relay:</li>
</ul>
<p><img alt="" src="./images/iredadmin/user_profile_relay.png" /></p><div class="footer">
    <p style="text-align: center; color: grey;">All documents are available in <a href="https://github.com/iredmail/docs/">GitHub repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://github.com/iredmail/docs/archive/master.zip">download the latest version</a> for offline reading. If you found something wrong, please do <a href="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
</div></body></html>